﻿@model YoYo.Cms.Web.Models.Account.TenantSelectionViewModel
@{
    ViewBag.Title = "Select Tenant";
}
@section Styles
{
    <link href="~/Views/Account/Login.css" rel="stylesheet" />
}
<div class="container">
    <div id="LoginArea" class="row">
        <div class="col-lg-12">
            <div class="well bs-component">

                <form action="@Model.Action" method="POST">
                    @Html.AntiForgeryToken()
                    <fieldset>
                        <legend>@L("TenantSelection")</legend>

                        <p>
                            @L("TenantSelection_Detail")
                        </p>

                        <div class="form-group form-md-radios">
                            <div class="md-radio-list">
                                @for (int i = 0; i < Model.Tenants.Count; i++)
                                {
                                    var tenant = Model.Tenants[i];
                                    <div class="md-radio">
                                        @{
                                    string checkAttr = null;
                                    if (i == 0)
                                    {
                                        checkAttr = "checked=\"checked\"";
                                    }
                                        }
                                        <input type="radio" class="md-radiobtn" id="TenancyName_@(tenant.TenancyName)" name="TenancyName" value="@tenant.TenancyName" @checkAttr>
                                        <label for="TenancyName_@(tenant.TenancyName)">
                                            @tenant.Name (@tenant.TenancyName)
                                        </label>
                                    </div>
                                }
                            </div>
                        </div>

                        <div class="form-actions">
                            <button type="submit" class="btn btn-success uppercase">@L("LogIn")</button>
                        </div>
                    </fieldset>
                </form>

            </div>
        </div>
    </div>
</div>
